<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="language" content="en" />

  <link rel="shortcut icon" href="<?php echo Yii::app()->theme->baseUrl; ?>/favicon.png" type="image/x-icon" >

  <!-- blueprint CSS framework -->
  <!--
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/screen.css" media="screen, projection" />
  <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/print.css" media="print" />
-->
  <!--[if lt IE 8]>
  <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/ie.css" media="screen, projection" />
  <![endif]-->

  <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/main_cms.css" />
 
 <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/form.css" />
 
 <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,700italic,600' rel='stylesheet' type='text/css' />

  <title><?php echo CHtml::encode($this->pageTitle); ?></title>
  <script type="text/javascript">
  function open_submenu(id)
  {
        var clid = 'menu_'+id;
       // $("#"+clid).append('<ul><li>aaaaa</li><li>bbbbbbbbb</li></ul>').slideDown('slow');
        $("#"+clid).parent().prepend('<ul><li>Pages</li><li>bbbbbbbbb</li></ul>').slideDown('slow');
  }
  </script>
</head>

<body>

<!--Wrapper Starts-->
<div class="wrapper">
<!--Main Starts-->
<div class="main">
<?php if($this->action->id!='login'){ ?>
	<div class="menu">
		<ul class="top-menu">
			<li><a href="#">ACCOUNT</a></li>
            <?php if(!Yii::app()->user->isGuest){?>
			<li><a href="<?php echo Yii::app()->createUrl('cms/logout') ?>">LOGOUT</a></li>
            <?php }else {?>
            <li><a href="<?php echo Yii::app()->createUrl('cms/login') ?>">LOGIN</a></li>
            <?php } ?>
		</ul>
	</div>
<?php } ?>
	<!--Sidebar Starts-->
	<div class="sidebar" <?php if(Yii::app()->user->isGuest) {?> style="background: none;" <?php }?>>
    
    <?php if(!Yii::app()->user->isGuest){ ?>
		<div class="logo"><img src="<?php echo Yii::app()->theme->baseUrl; ?>/img/logo.png" alt="" /></div>
	
	<div id="sidebar_menu">

<?php 

	$this->widget('zii.widgets.CMenu',array(
		'items'=>Content::model()->getTopMenuItems()
	)); 

 /*           	$url = $this->createAbsoluteUrl('cms/getContent').'/';
$this->widget('application.extensions.SimpleTreeWidget',array(
	'model'=>'Content',
    'modelPropertyParentId' => 'parent_id',
    'modelPropertyId'=>'id',
    'modelPropertyName' => 'name',
    'modelPropertyPosition' =>'seq_number',

    'ajaxUrl' => $this->createAbsoluteUrl('cms/simpletree'),
    'theme' =>'classic',
    'onSelect'=>'
        //alert(data.inst.get_selected().text());
        var id = data.inst.get_selected().attr("id").replace("node_","");
       $("#content-box").load("'.$url.'"+id);
    '
));
*/

?>
	</div>
<!-- 			

        <ul class="settingslist">
				<li class="green">
                <img src="<?php echo Yii::app()->theme->baseUrl; ?>/img/06.png" alt="" />
                <?php echo CHtml::ajaxLink('SETTINGS',Yii::app()->createUrl('cms/settings'),array('success'=>'js:function(data){
            $("#content-box").html(data);
        }',),array('id'=>'ajaxlink','class'=>'active',) ) ?>
                </li>
				
			</ul>  -->
            <?php } ?>
	</div>
	
	</div>
	<!--Sidebar Ends-->
	
	<!--Content Starts-->
	<div class="content">
		<!--Navs Starts-->
        <?php if($this->action->id!='login'){ ?>
		<!--div class="navs">
			<ul class="menu_items">
				<li><a href="#">ABOUT</a></li>
				<li><a href="#">HELP</a></li>
				<li><a href="#">CONTACT</a></li>
				<li><a href="#">FEEDBACK</a></li>
			</ul>
		</div-->
        
        <div class="signin">Logged in as <?php echo Yii::app()->user->name; ?></div>
		<?php } ?>
        <!--Navs Ends-->
	<!--
	<br class="clear" />
-->
		<?php echo $content; ?>
		<!--
<div class="content_top"><div class="settings"><h1>Settings</h1></div></div>
		
	
		<div class="tabs">
			<ul class="tab_items">
				<li class="active"><a href="#" >GENERAL</a></li>
				<li><a href="#">MODULES</a></li>
				<li><a href="#">THEMES</a></li>
			</ul>
		</div>
-->
		<!--Tabs Ends-->
        
        <!--Page Content Starts-->
		<!--
<div class="pagecnt">
			<h2>This is a generic settings page</h2><br />
			<p>Quisque commodo hendrerit lorem quis egestas. Maecenas quis tortor arcu.Vivamus rutrum nunc non neque consectetur quis placerat neque lobortis.</p><br />
			<h3>Change your site details</h3>
			<h4>SETTINGS SUB HEADING</h4><br />
			
			<form method="post" action="">
				<dl>
					<dd>
					<div class="dd_left"><label>Site Name</label></div>
					<div class="dd_right"><input type="text" placeholder="Incorrect data entered" /></div>
					</dd>
                    <div class="errorbox"><div class="errorboximg">invalid characters</div></div>
					<dd>
					<div class="dd_left"><label>Form Title</label></div>
					<div class="dd_right"><input type="text" placeholder="Correct entry" /></div>
					</dd>
					<dd>
					<div class="dd_left"><label>Form Title</label></div>
					<div class="dd_right"><select><option>Correct entry</option></select></div>
					</dd>
				</dl>
				<div class="button_section"></div>
				
				<button class="save">SAVE</button>
			</form>
		</div>
-->
		<!--Page Content Ends-->
		
	</div>
	<!--Content Ends-->

</div>
<!--Main Ends-->
</div>
<!--Wrapper Ends-->


<br class="clear" />

<!--Footer Starts-->
<div  class="footer">
     	<div class="one"></div>
		<div class="two"></div>
 		<div class="three "><h5 style="text-align:center;">&copy; NEON FIELDS</h5></div>
</div>
<!--Footer Ends-->


</body>
</html>
